package com.heqiang.manage.controller;


import com.heqiang.api.manage.AdminControllerApi;
import com.heqiang.manage.service.AdminService;
import com.heqiang.model.manage.Admin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/*
在引导类MySpringBootApplication同级包或者子级包中创建Controller
默认扫描基础包下所有资源
 */
@Controller
@RequestMapping("/bx/admin")
@RestController
public class AdminController implements AdminControllerApi {

    @Autowired
    private AdminService service;

    @RequestMapping("/list")
    public List<Admin> search(){
        return service.search();
    }


}
